/* Upload Result Component Styles */
.upload-result {
  position: fixed;
  top: 0;
  left: 80px; /* sidebar 宽度 */
  right: 0;
  bottom: 0;
  z-index: 2000; /* 确保比 LLM 面板层级更高 */
  background: #000000;
  display: flex;
  flex-direction: column;
}

/* Top Navigation */
.result-topnav {
  height: 60px;
  background: #1a1a1a;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
}

.topnav-left {
  display: flex;
  align-items: center;
}

.back-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.back-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.topnav-center {
  flex: 1;
  display: flex;
  justify-content: center;
}

.topnav-title {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin: 0;
}

.topnav-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.topnav-action-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.topnav-action-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.result-container {
  display: flex;
  width: 100%;
  height: calc(100vh - 60px); /* 减去 topnav 高度 */
  flex: 1;
}

/* 左侧图片区域 */
.result-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: #1a1a1a; /* 与主题背景色保持一致 */
}

.result-image-container {
  position: relative;
  width: 100%;
  max-width: 600px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.result-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
}

/* 右侧控制面板 */
.result-right {
  width: 480px;
  background: #2a2a2a;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}


/* 图片信息区域 */
.result-info {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.info-section {
  margin-bottom: 20px;
}

.info-title {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin: 0 0 8px 0;
}

.info-content {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
}

.thumbnail-grid {
  display: flex;
  flex-direction: row;
  gap: 8px;
  margin: 16px 0;
  justify-content: center;
  align-items: flex-end;
}

.thumbnail-item {
  border-radius: 6px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
}

.thumbnail-item:hover {
  border-color: rgba(102, 126, 234, 0.5);
  transform: translateY(-2px);
}

.thumbnail-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 不同尺寸的缩略图 - 横向排列，每个比前一个大10px，最小120px */
.thumbnail-small {
  width: 120px;
  height: 120px;
}

.thumbnail-medium {
  width: 130px;
  height: 130px;
}

.thumbnail-large {
  width: 140px;
  height: 140px;
}

.info-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.info-label {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
}

.info-value {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.05);
  padding: 4px 8px;
  border-radius: 4px;
}

.info-details {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  padding: 4px 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.info-details:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

/* 功能按钮区域 */
.upload-result-actions {
  flex: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* 功能区域 */
.action-section {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  overflow: hidden;
}

/* 生成区域特殊样式 - 有背景无边框 */
.action-section.generate-section {
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 16px;
}

/* 编辑区域特殊样式 - 有背景无边框 */
.action-section.edit-section {
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 12px 16px;
}

/* 更多区域特殊样式 - 有背景无边框 */
.action-section.more-section {
  border: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 16px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* padding: 12px 16px; */
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: all 0.2s ease;
}

.section-header:hover {
  background: rgba(255, 255, 255, 0.08);
}

/* 所有区域的 section-header 特殊样式 - 无背景和边框 */
.action-section .section-header {
  background: transparent;
  border-bottom: none;
  /* padding: 0 0 0; */
  cursor: default;
}

.action-section .section-header:hover {
  background: transparent;
}


.section-title {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.section-buttons {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.section-buttons.grid-buttons,
.generate-buttons,
.more-buttons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}


.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-icon svg {
  width: 16px;
  height: 16px;
}


.section-btn {
  background: rgba(184, 221, 255, 0.06);
  color: rgba(224, 245, 255, 0.8);
  border: 1px solid rgba(184, 221, 255, 0.1);
  padding: 10px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.section-btn:hover {
  background: rgba(184, 221, 255, 0.1);
  color: #ffffff;
  border-color: rgba(0, 202, 224, 0.3);
}

/* 所有区域的按钮统一样式 - 无边框无背景 */
.action-section .section-btn {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.8);
  padding: 8px 0;
  border-radius: 0;
  font-size: 14px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
}

.action-section .section-btn:hover {
  background: none;
  color: #ffffff;
  border: none;
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .upload-result {
    left: 0; /* 移动端覆盖整个屏幕 */
  }
  
  .result-container {
    flex-direction: column;
    height: calc(100vh - 60px);
  }
  
  .result-left {
    flex: none;
    height: 50vh;
    padding: 20px;
  }
  
  .result-right {
    width: 100%;
    height: 50vh;
  }
}

@media (max-width: 768px) {
  .result-left {
    padding: 16px;
  }
  
  .result-right {
    height: 60vh;
  }
  
  .result-header {
    padding: 12px 16px;
  }
  
  .result-info {
    padding: 16px;
  }
  
  .upload-result-actions {
    padding: 16px;
  }
  
  .section-buttons.grid-buttons {
    grid-template-columns: 1fr;
  }
  
  .thumbnail-grid {
    flex-direction: row;
    justify-content: center;
    gap: 6px;
  }
  
  .thumbnail-small {
    width: 80px;
    height: 80px;
  }
  
  .thumbnail-medium {
    width: 90px;
    height: 90px;
  }
  
  .thumbnail-large {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .result-left {
    padding: 12px;
  }
  
  .result-header {
    padding: 8px 12px;
  }
  
  .result-info {
    padding: 12px;
  }
  
  .upload-result-actions {
    padding: 12px;
  }
  
  .section-btn {
    padding: 8px 12px;
    font-size: 13px;
  }
}
